
struct ListNode* middleNode(struct ListNode* head, int k) {

    struct ListNode* fast, * slow;
    fast = slow = head;
    while (k--)
    {
        if (fast == NULL)
            return NULL;
        fast = fast->next;
    }
    while (fast)
    {
        fast = fast->next;
        slow = slow->next;
    }
    return slow;



}